/* Global styles */
:root {
  /* Light theme variables */
  --app-background: #f5f7fa;
  --text-color: #303133;
  --border-color: #dcdfe6;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Dark theme variables */
.dark {
  --app-background: #141414;
  --text-color: #e5eaf3;
  --border-color: #4c4d4f;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* RTL Support */
[dir="rtl"] .el-icon {
  transform: scaleX(-1);
}

[dir="rtl"] .el-button-group .el-button:first-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--el-border-radius-base);
  border-bottom-right-radius: var(--el-border-radius-base);
}

[dir="rtl"] .el-button-group .el-button:last-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: var(--el-border-radius-base);
  border-bottom-left-radius: var(--el-border-radius-base);
}

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-color);
  background-color: var(--app-background);
  transition: background-color 0.3s, color 0.3s;
  margin: 0;
  padding: 0;
}

/* Localization support */
html[lang="zh-CN"] {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html[lang="en"] {
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #c0c4cc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #909399;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-thumb {
  background: #555;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #666;
}
